- title '修改个人信息'
#edit-profile
  %h2.edit-padding-left
    修改账户信息
  = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'form-horizontal' }) do |f|
    = devise_error_messages!
    .form-group
      = f.label :ident, '用户名', class:'col-sm-1 control-label'
      .col-sm-4
        = f.text_field :ident, autofocus: true, class: 'form-control'
    .form-group
      = f.label :email, '邮箱', class:'col-sm-1 control-label'
      .col-sm-4
        = f.email_field :email, class: 'form-control'
        - if devise_mapping.confirmable? && resource.pending_reconfirmation?
          .col-sm-4
            %i
              邮箱: #{resource.unconfirmed_email} 正在验证中...
    .form-group
      = f.label :password, '新密码', class:'col-sm-1 control-label'
      .col-sm-4
        = f.password_field :password, placeholder: '新密码不少于6位', class: 'form-control'
      .col-sm-4
        %i (不更改密码请留空)
    .form-group
      = f.label :password_confirmation, '确认新密码', class:'col-sm-1 control-label'
      .col-sm-4
        = f.password_field :password_confirmation, placeholder: '再次输入新密码', class: 'form-control'
    .form-group
      = f.label :current_password, '当前密码', class:'col-sm-1 control-label'
      .col-sm-4
        = f.password_field :current_password, placeholder: '当前密码(用于确认身份信息)', class: 'form-control'
      .col-sm-4
        %i (需要你的当前账户密码来验证改动)
    .form-group
      .col-sm-offset-1.col-sm-3
        = f.submit '修改', class: 'btn btn-primary btn-sm width-btn'
  .edit-padding-left
    %h3 注销我的账户
    %p
      #{button_to "注销我的账户", registration_path(resource_name), data: { confirm: "注销后所有的此用户的资源将被释放, 确定要注销账户? " }, method: :delete, class: 'btn btn-danger btn-sm width-btn'}
